x86/vvmx: Fix handing of the MSR_BITMAP field with VMCS shadowing
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 19 Jul 2017 09:28:03 +0000 (10:28 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 27 Jul 2017 10:39:57 +0000 (11:39 +0100)
commit930f7879248edc05d9cb812e692eee6eb3b70eac
treefb7400f84985ffa77f1e8ffd44030b6f814eaf51
parent4da2fe19232e37d3699cd0f4964915dc00b40b58
x86/vvmx: Fix handing of the MSR_BITMAP field with VMCS shadowing

Currently, the following sequence of actions:

 * VMPTRLD (creates a mapping, likely pointing at gfn 0 for an empty vmcs)
 * VMWRITE CPU_BASED_VM_EXEC_CONTROL (completed by hardware)
 * VMWRITE MSR_BITMAP (completed by hardware)
 * VMLAUNCH

results in an L2 guest running with ACTIVATE_MSR_BITMAP set, but Xen using a
stale mapping (likely gfn 0) when reading the interception bitmap.  The
MSR_BITMAP field needs unconditionally intercepting even with VMCS shadowing,
so Xen's mapping of the bitmap can be updated.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Sergey Dyasli <sergey.dyasli@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/vvmx.c